package com.study.spark.scala.chapter11

object Scala03_Generic {
  def main(args: Array[String]): Unit = {
    // TODO scala中的泛型和java中大同小异
    // scala中泛型的上下文限定：泛型和隐式转换的结合产物
    def f[A : Test](a: A) = println(a)
    implicit val test : Test[User] = new Test[User]
    f( new User() )
  }
  def  test[A]( a : A ): Unit = {
    println(a)
  }

  class Test[T] {
  }

  class Parent {

  }
  class User extends Parent{
  }

  class SubUser extends User {
  }
}
